#include <stdio.h>

int main(int argc, char *argv[])
{
    //m：输入的数字 n：倒叙输入的结果 k：控制正负号
    int m, n, k;

    scanf("%d", &m);

    n = 0;
    k = 1;

    if(m<0){
        m = -m;
        k = -1;
    }

    while (m!=0)
    {
        n = n * 10 + m % 10;
        m /= 10;
    }

    n = n * k;

    printf("%d", n);

    return 0;
}